package edu.lingnan.lingnanblog.service;

import edu.lingnan.lingnanblog.entity.Link;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 * @author wenchang
 * @since 2020/6/16 15:30
 */

@Component
@FeignClient(value = "LINGNANBLOG-PROVIDER-LINK")
public interface LinkClientService {
    @RequestMapping("link/list")
    List<Link> list(@SpringQueryMap Map<String, Object> map);

    @RequestMapping("link/getTotal")
    Long getTotal(@SpringQueryMap Map<String, Object> map);

    @RequestMapping("link/add")
    Integer add(@SpringQueryMap Link link);

    @RequestMapping("link/save")
    Integer update(@SpringQueryMap Link link);

    @RequestMapping("link/delete")
    Integer delete(@RequestParam("ids") int ids);

}


